<template>
  <div class="todo">
    <div class="top_a">
      <div class="left">待办事项</div>
      <div class="right" @click="$emit('openAddTask')">添加任务</div>
    </div>
    <div v-for="item in $store.getters['about/aboutList'].slice(0,3)" class="item_todo">
      <div>{{ item.name }}</div>
      <div>截至日期： {{ item.dateUpTo }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "index",
  data() {
    return {}
  }
}
</script>

<style lang="scss" scoped>
.todo {
  display: flex;
  flex-direction: column;
  padding: 2vh;

  .top_a {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1vh;

    .left {
      font-size: 2vh;
    }

    .right {
      width: 6vw;
      text-align: center;
      height: 4vh;
      line-height: 4vh;
      background: #7ac2ff;
      color: white;
      border-radius: 4px;
      cursor: pointer;
    }
  }

  .item_todo {
    margin-bottom: 2vh;
    height: 5vh;
    background: #F9FAFB;
    display: flex;
    align-items: flex-end;
    align-items: center;
    justify-content: space-between;
    padding: 2vh;
    border-radius: 8px;

    div:nth-child(2) {
      color: #505050;
      font-size: 13px;
    }
  }
}
</style>
